package firstday;

public class Node {
    Node pre;//上一个节点
    Object obj;//当前数据
    Node next;//下一个节点
    //构造函数
    public Node(Node pre, Object obj, Node next) {
        super();
        this.pre = pre;
        this.obj = obj;
        this.next = next;
    }
    public Node() {
    }
    //封装set和get方法
    public Node getPre() {
        return pre;
    }
    public void setPre(Node pre) {
        this.pre = pre;
    }
    public Object getObj() {
        return obj;
    }
    public void setObj(Object obj) {
        this.obj = obj;
    }
    public Node getNext() {
        return next;
    }
    public void setNext(Node next) {
        this.next = next;
    }

}
